Regular expression order-sorted unification and matching
نویسندگان
چکیده
We extend order-sorted unification by permitting regular expression sorts for variables and in the domains of function symbols. The obtained signature corresponds to a finite bottom-up unranked tree automaton. We prove that regular expression order-sorted (REOS) unification is of type infinitary and decidable. The unification problem presented by us generalizes some known problems, such as, e.g., order-sorted unification for ranked terms, sequence unification, and word unification with regular constraints. Decidability of REOS unification implies that sequence unification with regular hedge language constraints is decidable, generalizing the decidability result of word unification with regular constraints to terms. A sort weakening algorithm helps to construct a minimal complete set of REOS unifiers from the solutions of sequence unification problems. Moreover, we design a complete algorithm for REOS matching, and show that this problem is NP-complete and the corresponding counting problem is #P-complete.
منابع مشابه
Order-Sorted Unification with Regular Expression Sorts
We extend first-order order-sorted unification by permitting regular expression sorts for variables and in the domains of function symbols. The set of basic sorts is finite. The corresponding unification problem is infinitary. We conjecture that this unification problem is decidable and give a complete unification procedure.
متن کاملMatching of Order-Sorted Terms with Regular Expression Sorts and Second-Order Variables
We construct a sound and complete matching procedure for order-sorted terms with regular expression sorts and second-order variables. Since the theory is infinitary, there are matching problems on which the procedure does not terminate. Restricting the rules of the procedure, we obtain an incomplete terminating algorithm and give some examples of its possible applications in source code searching.
متن کاملSorted Unification Using Set Constraints
This paper describes a new representation for sortal constraints and a uniication algorithm for the corresponding constrained terms. Variables range over sets of terms described by systems of set constraints that can express limited inter-variable dependencies. These sets of terms are more general than regular tree languages, but are still closed under intersection. The new uniication algorithm...
متن کاملDeterministic Second-order Patterns in Program Transformation
Higher-order patterns, together with higher-order matching, enable concise specification of program transformation, and have been implemented in several program transformation systems. However, higherorder matching generally generates nondeterministic matches, and the matching algorithm is so expensive that even second-order matching is NP-complete. It is orthodox to impose constraint on the fo...
متن کاملOrder-sorted Equational Unification Revisited
This paper presents a rule-based algorithm for performing order-sorted E-unification using an unsorted E-unification decision procedure under assumptions about E that are commonly satisfied in practice. We have implemented this algorithm in Maude for use with the Maude-NRL protocol analyzer and have used CiME for unsorted E-unification for E any set of AC and ACU axioms. In many examples of int...
متن کامل